<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数</title>
</head>
<body>
<script>
    sum(3,4);
    sum("3",4);
    sum("Hello","World");
    function sum(a, b) {
        console.log(a + b);
    }
    //匿名函数
    (function(a, b) {
        console.log("a = " + a);
        console.log("b = " + b);
    })(123, 456);
</script>
</body>
</html>